package com.beiding.jsonanalyzer.analyze.query;

import com.beiding.jsonanalyzer.analyze.func.FuncBase;
import com.beiding.jsonanalyzer.analyze.func.FuncFactory;

/**
 * 子条件语法
 * @author 丁常磊
 * @date 2022/6/27 13:57
 */

public interface QueryGrammar extends ContextGenerate {

    default LastConnectOperator query(FuncFactory<FuncBase<ComparatorResult>> comparator) {
        NodeQueryBuilder context = getQueryBuilder();
        context.addElement(comparator);
        return new LastConnectOperator(context);
    }

}
